home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 3 / Gold Medal Software - Volume 3 (Gold Medal) (1994).iso / wordproc / t_res11.arj / MARG.DOC < prev    next >
Text File  |  1993-12-27  |  22KB  |  550 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.         
  8.         
  9.         
  10.         
  11.         
  12.         
  13.                             _______
  14.                        ____|__     |               (TM)
  15.                     --|       |    |-------------------
  16.                       |   ____|__  |  Association of
  17.                       |  |       |_|  Shareware
  18.                       |__|   o   |    Professionals
  19.                     -----|   |   |---------------------
  20.                          |___|___|    MEMBER
  21.         
  22.                            MARGARINE Version 3.2
  23.                    Copyright 1991-1993 by Tay-Jee Software
  24.         
  25.            OK, so why is this program called MARGARINE?  Because it
  26.         "spreads" the MARGins of your text files!!
  27.         
  28.            So much for bad humor...
  29.            
  30.            If you evaluate alot of shareware programs (and I do), you
  31.         might be annoyed at how so many times the left margin of the
  32.         documentation file is in column 0, or there are no page breaks
  33.         or page numbers.  When printing out the file, this can lead to
  34.         a really lopsided-looking document, especially if the right 
  35.         margin is in the 60-70 column range.  If you wanted to punch 
  36.         holes in the document and put it into a binder, you would end 
  37.         up punching out some of the text in the first few columns.  
  38.         While several print utilities such as Norm Patriquin's PPRINT 
  39.         (an excellent program, by the way) allow you to specify a left
  40.         margin while printing, they have several drawbacks:
  41.         
  42.               a) if you select too large of a value for the left
  43.               margin, some lines will "overflow" onto the next
  44.               line.  This, in turn, will screw up page formatting
  45.               and page lengths.
  46.         
  47.               b) most of these programs take over your machine instead
  48.               of running in the background like DOS print.  This can
  49.               be a real inconvenience when printing 200K+ documentation
  50.               files.
  51.             
  52.            OK, so what's the point?
  53.            
  54.            MARGARINE 3.2 is a very simple program I wrote to overcome
  55.         both of these problems.  First, MARGARINE will scan your entire
  56.         document in order to find the longest single line.  Based on
  57.         this length, it calculates how much of a "buffer" can be added
  58.         to each line in the file without pushing the right margin off
  59.         the edge of the screen/paper.  MARGARINE will then add whatever 
  60.         amount of "padding" you specify to the left margin of the doc-
  61.  
  62.                                      Page 1
  63.  
  64.  
  65.  
  66.  
  67.  
  68.         ument and write the result to a new file.  Optionally, MARGA-
  69.         RINE will add top and bottom margins and paginate your docu-
  70.         ment for you.  The resulting document can then be printed from
  71.         the DOS command line (using PRINT.COM or PRINT.EXE) and will 
  72.         have a nice left margin.
  73.         
  74.                 
  75.         STARTING THE PROGRAM
  76.         
  77.            MARGARINE Version 3.2 contains a new menu-driven interface.  
  78.         In order to make use of the interface, type MARG by itself on   
  79.         the command line.                                               
  80.         
  81.            When the program begins, you will see a square menu centered 
  82.         on the screen.  Several options will be listed on the lefthand  
  83.         side of the menu, with the first highlighted.  Space exists on  
  84.         the righthand side of the menu for various program information. 
  85.         
  86.            Select an option by using the up/down cursor keys to position
  87.         the highlight over the desired option, then pressing Enter.     
  88.         Each option will require you to select information from a scrol-
  89.         ling menu, or to type in information in a dialog box.  Options  
  90.         (and corresponding input choices) are described below:          
  91.         
  92.            INPUT FILE:  Select this option to specify the name of a file
  93.         to format.  A list of all files in the CURRENT directory will be
  94.         displayed on the center  of the screen.  Scroll up and down the 
  95.         list until you find the file you want, then press Enter.  The   
  96.         selected file name will appear on the menu.                     
  97.         
  98.            OUTPUT FILE:  Select this option to specify a file name to   
  99.         which the formatted text will be written.  Type any legal DOS   
  100.         filename in the dialog box.                                     
  101.         
  102.            TOP MARGIN:  Select this option to specify a top page margin 
  103.         in rows.  A maximum of 30 rows a permitted.                     
  104.         
  105.            BOTTOM MARGIN:  Select this option to specify a bottom page  
  106.         margin in rows.  A maximum of 30 rows are permitted, and the    
  107.         bottom margin must be at least two rows if page numbers are re- 
  108.         quested.                                                        
  109.         
  110.            COLUMN WIDTH:  Select this option to specify the width in    
  111.         characters of the page you would like to use.  The default val- 
  112.         ue is 80 characters.  Other common values are 96 or 120 (equal  
  113.         to 12 CPI and 15 CPI text, respectively.                        
  114.         
  115.            PAGE NUMBERS:  Use this option to specify whether or not to  
  116.         paginate the formatted document.                                
  117.         
  118.            FORM FEEDS:  Use this option to tell MARGARINE how to handle 
  119.         form feed characters encountered in the input file.  Select "No 
  120.         Action" to simply leave the form feeds exactly where they were  
  121.         in the original file.  Select "Force page" to maintain the rel- 
  122.  
  123.                                      Page 2
  124.  
  125.  
  126.  
  127.  
  128.  
  129.         ative position of the form feed within the document and adjust  
  130.         page numbers.  Select "Remove & ignore" to strip the form feeds 
  131.         out of the document.
  132.         
  133.            CONVERT CHARS:  Many printers emulate the Epson character
  134.         set which replaces the IBM extended characters with italic let-
  135.         ters.  These IBM characters are often used in documentation to
  136.         create boxes, tables, etc.  Setting this option to "YES" causes
  137.         all extended box and line characters to be replaced by charac-
  138.         ters from the Epson standard character set.
  139.         
  140.            LASER FORMAT:  When used in conjunction with top and bottom  |
  141.         margins or pagination, Margarine will normally set the page     |
  142.         length to 66 lines, the standard for dot matrix printers.  When |
  143.         "Yes" is selected under this item, the page length used will be |
  144.         60 lines, the standard for most laser printers.                 |
  145.         
  146.            Once you have selected all the applicable options, you can   
  147.         hit F10 to begin formatting the text file, or ESC to abort to   
  148.         DOS.                                                            
  149.         
  150.         
  151.            Help                                                         
  152.            
  153.            To obtain help from the menu, press F1.  Help for the spec-  
  154.         ific menu item will appear in a dialog box.  You can use the    
  155.         cursor arrows to scroll the text and view the entire help text. 
  156.         
  157.            
  158.            Command Line Operation                                       
  159.         
  160.            To run the program from the command line, use the following  
  161.         syntax:
  162.            
  163.         MARG file [outfile] [/A] [/Cn] [/Tn [/Bn] [/P] [/F±] [/E] [/H] |
  164.         
  165.            file  --  This is the name of the file you would like to 
  166.            modify.  This is required.  The file must be in the cur-
  167.            rent directory.
  168.            
  169.            outfile  --  This is the name of the new file which will 
  170.            be written, containing the changes made to the original 
  171.            input file.  If none is specified, the first two char-
  172.            acters of input file will be changed to "$" and this will 
  173.            become the output file.
  174.            
  175.            /A -- Use laser printer standard of 60 lines per page rather |
  176.            than 66 lines.                                               |
  177.         
  178.            /Cn  --  Set column width.  Normally, MARGARINE assumes you 
  179.            want a document with 80 columns.  Use this switch to specify 
  180.            an alternate width between 25 and 132 columns.  This will 
  181.            have an impact on how much space is available for the inser-
  182.            tion of a left margin.   Replace 'n' with the number of col-
  183.  
  184.                                      Page 3
  185.  
  186.  
  187.  
  188.  
  189.  
  190.            umns you desire.  If you specify less than 25 or more than 
  191.            132 columns, the default of 80 columns will be used.
  192.         
  193.            /Tn  --  Set top margin.  Replace 'n' with the number of
  194.            lines you would like for a top margin.  This number must
  195.            be between 0 and 30.
  196.         
  197.            /Bn  --  Set bottom margin.  Replace 'n' with the number
  198.            of lines you would like for a bottom margin.  This number
  199.            must also be between 0 and 30.  If not specified, this will
  200.            become the same as the top margin.  If you do not specify a
  201.            top margin, the bottom margin will always be zero and this
  202.            switch will be ignored.
  203.         
  204.            /P --  Include page numbers.  A page number will be added
  205.            to each page of the document.  The page number will be cen-
  206.            tered on the bottom of each page, including the last.  You
  207.            must have specified a bottom margin of at least two lines.
  208.            
  209.            /F± -- Form feeds.  This switch will affect the way in which  
  210.            MARGARINE handles form feed characters (ASCII 12) embedded   
  211.            in the input file.  /F+ will keep the form feeds in place,   
  212.            forcing a new page at the designated position.  Page numbers 
  213.            will be preserved if the /P option has also been specified.  
  214.            /F- will cause MARGARINE to remove all form feed characters.
  215.            
  216.            /E -- Extended character conversion.  Replaces all extended
  217.            box and line drawing characters with standard characters for 
  218.            printing on printers using Epson emulation.
  219.            
  220.            /H -- Help screen.  A brief help screen will be displayed
  221.            when MARG is entered alone on the command line or in con-
  222.            junction with the /H switch.  The DOS errorlevel is set to
  223.            1 when the /H switch is used.
  224.         
  225.            The command line switches may be preceded by either the "/" 
  226.         or "-" character and may be entered in any order.  The names of
  227.         the input and output files MUST be the first and second argu-
  228.         ments entered on the command line, respectively, and must be 
  229.         legal DOS file names.  The only exception to this is the /H 
  230.         switch which must be entered alone on the command line with the
  231.         "MARG" command.
  232.         
  233.         Command Examples:
  234.         
  235.            To add a left margin to the file TEST.DOC and write output
  236.         to the file $$ST.DOC:
  237.            
  238.               MARG test.doc
  239.               
  240.            
  241.            To add a left margin to the file TEST.DOC, write the output
  242.         to TEST.TXT, and use a column width of 96 (12 CPI Prestige):
  243.         
  244.  
  245.                                      Page 4
  246.  
  247.  
  248.  
  249.  
  250.  
  251.               MARG test.doc test.txt /c96
  252.               
  253.               
  254.            To add a left margin to the file TEST.DOC, with one-inch
  255.         top and bottom margins, and write output to the file $$ST.DOC:
  256.         
  257.               MARG test.doc /t6
  258.               
  259.            
  260.            To add a left margin to the file TEST.DOC, write output to
  261.         TEST.TXT, with top margin of one inch and bottom margin of a
  262.         half inch, with page numbers and page width of 64 (8 CPI):
  263.         
  264.               MARG test.doc test.txt /t6 /b3 /p /c64
  265.         
  266.                 
  267.         Be careful!  MARGARINE is not very intelligent, and it will 
  268.         insert page breaks in some pretty silly places sometimes 
  269.         (like in the middle of a table).  For aesthetic purposes, you
  270.         may want to do some manual editing.
  271.         
  272.            Upon entering the proper command to begin the program, you
  273.         will be shown a message displaying the amount of space avail-
  274.         able for the left margin.  You will then be asked to enter the
  275.         value you actually want the program to use.  The output file 
  276.         will then be written.  While the output file is being written,
  277.         a "gas gauge" will appear showing what percentage of the oper-
  278.         ation has been completed (see below):
  279.         
  280.         0┬┬┬10┬┬┬20┬┬┬30┬┬┬40┬┬┬50┬┬┬60┬┬┬70┬┬┬80┬┬┬90┬┬100
  281.         ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
  282.         
  283.         
  284.         Error Messages
  285.         
  286.            The program can produce several error messages:
  287.            
  288.         
  289.            "Line length too long to add margin."
  290.            
  291.            This message is printed if MARGARINE encounters a line in
  292.         your document that is longer than your specified column width.
  293.         If you have specified a top margin, execution of the program
  294.         continues and top, bottom, and/or page numbers will be added
  295.         normally.  If you have not specified a top margin, the DOS 
  296.         errorlevel is set to 4 and the program terminates.
  297.         
  298.            
  299.            "Incorrect number of parameters."
  300.            
  301.            This message is printed when you do not enter any parameters
  302.         on the command line, or enter too many parameters.  The help
  303.         screen is displayed, the DOS errorlevel is set to 2, and the
  304.         program terminates.
  305.  
  306.                                      Page 5
  307.  
  308.  
  309.  
  310.  
  311.  
  312.         
  313.            
  314.            "*** Can't open input text file ***"
  315.              
  316.            This message is printed when the input file does not exist
  317.         or is not in the current directory.  The DOS errorlevel is set 
  318.         to 3 and the program terminates.
  319.         
  320.            
  321.            "*** Invalid entry.  Enter number between 0 and n"
  322.         
  323.            This message is printed if you enter a value for the left
  324.         margin that is too large or too small.
  325.                 
  326.            The DOS errorlevel is set to 0 upon successful termination
  327.         of the program.
  328.         
  329.            The program is also useful for adding margins to your own 
  330.         text file memos, letters, etc.  For example, the simple editor
  331.         that I use does not support margins or pagination.  I use 
  332.         MARGARINE to add a left margin to improve the appearance of my
  333.         documents, and to add top and bottom margins for a more profes-
  334.         sional look.  This document was formatted with MARGARINE 3.2 
  335.         producing the wide left margin, page breaks, and page numbers 
  336.         you see here.
  337.         
  338.         
  339.         REGISTRATION
  340.         
  341.            This program is a copyrighted work.  Its use is governed
  342.         strictly under the terms of the license agreement detailed
  343.         below.
  344.         
  345.            You have a limited license to operate this program on your
  346.         computer for a period of no more than 30 days free of charge.
  347.         If, after this trial period, you decide you would like to 
  348.         continue using MARGARINE v3.2, you must register the program.
  349.         ANY OTHER USE OF THIS PROGRAM IS A VIOLATION OF COPYRIGHT LAWS.
  350.         
  351.            To register the program, send $14.95 to the address at the 
  352.         end of this documentation.  Your registration fee gets you:
  353.         
  354.            - The latest version of MARGARINE on disk, with registration
  355.              reminders (nag screens) removed
  356.            
  357.            - Discounts on upgrades to future versions of MARGARINE
  358.            
  359.            - Shareware versions of our other programs
  360.            
  361.         
  362.         DISCLAIMER
  363.         
  364.            This program is guaranteed to do absolutely NOTHING!  It 
  365.         does, however, in my experience perform reasonably close to
  366.  
  367.                                      Page 6
  368.  
  369.  
  370.  
  371.  
  372.  
  373.         what is described herein.  The author assumes no liability
  374.         for loss or damage caused through the use of this program.
  375.         Before trying the program, especially for the first time
  376.         or on any important text files, make a backup copy of the
  377.         text files you are planning to manipulate.  No warranty, 
  378.         express or implied, is provided for this software's perform-
  379.         ance, merchantability, or fitness for a particular purpose.
  380.         
  381.            All trademarks are property of their respective owners.
  382.         
  383.         
  384.         ASP OMBUDSMAN
  385.         
  386.           This program is produced by a member of the Association of
  387.         Shareware Professionals (ASP).  ASP wants to make sure that
  388.         the shareware principle works for you.  If you are unable to
  389.         resolve a shareware-related problem with an ASP member by
  390.         contacting the member directly, ASP may be able to help.  The
  391.         ASP Ombudsman can help you resolve a dispute or problem with
  392.         an ASP member, but does not provide technical support for 
  393.         members' products.  Please write to the ASP Ombudsman at 545
  394.         Grover Road, Muskegon, MI 49442 or send a CompuServe message
  395.         via CompuServe Mail to ASP Ombudsman, 70007,3536.
  396.         
  397.         
  398.         The programs and documentation are Copyright 1991-1993 by Chuck
  399.         Steenburgh and Tay-Jee Software.  You are encouraged to distri-
  400.         bute these programs provided the following conditions are met:
  401.         
  402.            - all files contained in the archive or distribution disk
  403.              must be distributed together in UNMODIFIED form
  404.         
  405.            - you charge no more than a reasonable fee for copying or
  406.              subscription, and clearly indicate that payment of such
  407.              a fee does NOT grant ownership of the programs.
  408.         
  409.            Send comments/registrations to:
  410.         
  411.                 Tay-Jee Software
  412.                 Post Office Box 835
  413.                 Lexington, VA 24450
  414.                 (703)464-5290
  415.                 
  416.                 !!!VIRGINIA RESIDENTS ADD 4.5SALES TAX!!!
  417.         
  418.                 CIS 72330,1776 (I haunt the IBMSYS and IBMPRO forums)
  419.         
  420.         
  421.            I welcome comments and suggestions from all.  I may be 
  422.         reached as indicated below:
  423.            
  424.            Tay-Jee Software            CIS:  72330,1776
  425.            P.O. Bix 835
  426.            Lexington, VA 24450
  427.  
  428.                                      Page 7
  429.  
  430.  
  431.  
  432.  
  433.  
  434.            (703)464-5290 evenings
  435.            
  436.            I answer all phone calls, comments, and E-mail!
  437.         
  438.           
  439.                                   VERSION HISTORY
  440.           
  441.           3.2  - 27 December 1993: Added /A switch for laser printers
  442.           
  443.           3.11 - 11 January 1993:  Cleaned up menu interface
  444.                                    Fixed minor bug with Epson conversions
  445.           
  446.           3.1  - 7 December 1992:  Added /E switch for Epson conversions
  447.           
  448.           3.0  - 12 October 1992:  Added /F parameter for form feeds
  449.                                    Added menu interface
  450.                                    Added context-sensitive online help
  451.           
  452.           2.81 - 21 December 1991:  Minor bug fix (damn those things!!)
  453.                          
  454.           2.8  - 20 December 1991:  Finally got around to reconstruc-
  455.                                     ting the source code after my hard
  456.                                     disk crashed
  457.                                     Added "gas gauge"
  458.                                     Improved help screen
  459.                                     Allowed top/bottom/pagination when
  460.                                     line length was too large for
  461.                                     adding a left margin
  462.                                     Improved error tones
  463.                          
  464.           2.7  - 15 August 1991:  Cleaned up command line interface
  465.                                   Added pagination option
  466.                                   Separate top and bottom margins
  467.                                   
  468.           2.6  -  9 August 1991:  Buffered I/O improves performance 100
  469.                                   
  470.           2.51 - 18 July 1991:  Minor bug fix
  471.         
  472.           2.5  - 17 July 1991:  Added support for top and bottom margins
  473.                         
  474.           2.1  - 31 May 1991:  Added support for 25-132 column printers
  475.         
  476.           2.0  - 16 May 1991:  Added support for command line 
  477.                                specification of input/output files
  478.                                Sounds tone on error
  479.                   
  480.           1.2  - 16 April 1991:  Prevents overwriting existing
  481.                                  output file
  482.                                  Allowed user control over margin width
  483.                   
  484.           1.1  - 14 April 1991:  Added improved error handling
  485.                                  procedures
  486.                                  Allowed user control over output file 
  487.                                  name
  488.  
  489.                                      Page 8
  490.  
  491.  
  492.  
  493.  
  494.  
  495.         
  496.           1.0  - 10 April 1991:  Initial release
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.                                      Page 9